import Vue from 'vue'
import App from './App.vue'
import router from './router'

import './plugins/element.js'
// 引入全局样式
import './assets/globle.css'
//引入axios
import axios from "axios";
import da from "element-ui/src/locale/lang/da";

//为axios配置全局根路径
axios.defaults.baseURL="http://localhost:8888/crowdfunding_system_war_exploded/";
//请求监听器
/*axios.interceptors.request.use(config => {
  config.headers.token = window.sessionStorage.getItem("token");
})*/
//相应拦截器
/*axios.interceptors.response.use( data => {
  if (data.data.code == 400){                         //改
    alert(data.data.message);
    window.sessionStorage.clear();
    router.replace({})                      //未填
  }
  return data;
})*/

//把axios挂在到vue中 命名为 $http
Vue.prototype.$http=axios;


Vue.config.productionTip = false
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
